/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.clbs.ex.springgwt.client.model;

import com.google.gwt.user.client.rpc.IsSerializable;
import java.util.Date;

/**
 *
 * @author peerawat.poombua
 */
public class Post implements IsSerializable {

    private int postID;
    private String message;
    private Date creationDate;
    private int issueID;

    public Post(){};

    /**
     * @return the postID
     */
    public int getPostID() {
        return postID;
    }

    /**
     * @param postID the postID to set
     */
    public void setPostID(int postID) {
        this.postID = postID;
    }

    /**
     * @return the post
     */
    public String getMessage() {
        return message;
    }

    /**
     * @param post the post to set
     */
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * @return the creationDate
     */
    public Date getCreationDate() {
        return creationDate;
    }

    /**
     * @param creationDate the creationDate to set
     */
    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    /**
     * @return the issueID
     */
    public int getIssueID() {
        return issueID;
    }

    /**
     * @param issueID the issueID to set
     */
    public void setIssueID(int issueID) {
        this.issueID = issueID;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Post other = (Post) obj;
        if (this.postID != other.postID) {
            return false;
        }
        if ((this.message == null) ? (other.message != null) : !this.message.equals(other.message)) {
            return false;
        }
        if (this.creationDate != other.creationDate && (this.creationDate == null || !this.creationDate.equals(other.creationDate))) {
            return false;
        }
        if (this.issueID != other.issueID) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 67 * hash + this.postID;
        hash = 67 * hash + (this.message != null ? this.message.hashCode() : 0);
        hash = 67 * hash + (this.creationDate != null ? this.creationDate.hashCode() : 0);
        hash = 67 * hash + this.issueID;
        return hash;
    }
}
